<template>
  <hm-layout>
    <view class="svip-wraper">
      <view class="rights-list">
        <view class="title">会员权益</view>
        <view class="rights-item">
          <view class="dot"></view>
          <view class="content">解锁所有头像模板，无限下载</view>
        </view>
        <view class="rights-item">
          <view class="dot"></view>
          <view class="content">解锁直播权限</view>
        </view>
        <view class="rights-item">
          <view class="dot"></view>
          <view class="content">邀请返佣提升10%</view>
        </view>
        <view class="rights-item">
          <view class="dot"></view>
          <view class="content">享受VIP客服，加入专属VIP群</view>
        </view>
      </view>
      
      <view class="price-wrap">
        <view class="price-left">
          终身会员(限时特惠)
        </view>
        <view class="price-right">
          <view>¥<text class="strong">88</text></view>
          <view class="origin-price">&nbsp;/&nbsp;<text class="text">168</text></view>
        </view>
      </view>
      
      <view class="buy-wrap">
        <hm-pay v-if="isAndroid" orderType="svip" notityType="svip" @paySuccess="paySuccess"></hm-pay>
        <view v-else class="download-btn ui-BG-Main-Gradient">暂不支持开通会员</view>
      </view>
    </view>
  </hm-layout>
</template>

<script setup>
  const isAndroid = vk.myfn.HmUtils.isAndroid
  const paySuccess = () => {
    vk.vuex.dispatch('$user/fetchMytemplate', vk);
    vk.navigateBack();
  }
</script>

<style lang="scss" scoped>
.svip-wraper {
  padding: 30rpx;
  min-height: 100vh;
  background: var(--ui-BG-2);
  
  .rights-list {
    background: #fff;
    border-radius: 16rpx;
    padding: 0 20rpx;
    .title {
      font-size: 40rpx;
      font-weight: bold;
      text-align: center;
      padding: 30rpx 0 40rpx;
    }
    .rights-item {
      display: flex;
      align-items: center;
      padding-bottom: 50rpx;
      .dot {
        width: 12rpx;
        height: 12rpx;
        border-radius: 50%;
        background-color: #666 !important;
        margin-right: 20rpx;
      }
      .content {
        height: 34rpx;
        line-height: 34rpx;
        font-size: 34rpx;
        font-weight: bold;
        color: #333 !important;
      }
    }
  }
  .price-wrap {
    background: #fff;
    border-radius: 16rpx;
    margin-top: 30rpx;
    padding: 30rpx;
    display: flex;
    justify-content: space-between;
    color: var(--ui-BG-Main);
    font-size: 40rpx;
    font-weight: bold;
    align-items: center;
    
    .price-left {
    }
    .price-right {
      display: flex;
      align-items: baseline;
      .strong {
        font-size: 60rpx;
        margin-left: 6rpx;
      }
      .origin-price {
        color: #999;
        font-size: 28rpx;
        .text {
          text-decoration:line-through
        }
      }
    }
  }
  .buy-wrap {
    margin-top: 60rpx;
    width: 100%;
  }
}
.download-btn {
		width: 100%;
		margin-left: 10rpx;
		height: 90rpx;
    line-height: 90rpx;
    text-align: center;
		font-weight: bold;
		font-size: 32rpx;
		letter-spacing: 8;
		font-style: normal;
		font-weight: 500;
		color: #ffffff;
		border-radius: 45rpx;
	}
</style>
